#ifndef SIMDATA_TCPSEVER_H
#define SIMDATA_TCPSEVER_H

#include <QObject>
#include <QTcpServer>
#include <QTcpSocket>
#include"simdata_udpsever.h"

class SimData_TcpSever : public QObject
{
    Q_OBJECT
public:
    explicit SimData_TcpSever(QObject *parent = nullptr);
    ~SimData_TcpSever();
    void hz(int hz);
    void dataStart();
    void dataStop();

private:
    QTcpServer *m_TcpSever;
    QTcpSocket *m_TcpSocket;
    QList<SimData_UdpSever *> m_ListUdpSever;
    int m_HZ;

signals:
    void client(QString, QHostAddress, int);

public slots:
    void new_client();
    void read_client_data();
    void client_dis();
};

#endif // SIMDATA_TCPSEVER_H
